{% extends "double.html" %}
{% block title %}{{ page_title }}{% endblock %}
{% block styles %}
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}styles/signin.css">
{% endblock %}
{% block scripts %}
    <script type="text/javascript">
        $(document).ready(function(){
            var asideheight = $('aside').height();
            $('section').height(asideheight);
        })
    </script>
{% endblock %}

{% block main %}  
    <ul id="slogan">
        <li id="what"><p>迷你博客<br>记录生活的点点滴滴</p></li>
        <li id="who"><p>交流与分享<br>拉近你和朋友</p></li>
        <div class="clear"></div>
    </ul>
    <div class="clear"></div>
{% endblock %}
{% block aside %}  
<div class="form">
    <div class="message">
        {% if messages %}
        <ul class="messages">
            {% for message in messages %}
                <li>{{ message }}</li>
            {% endfor %}
        </ul>   
        {% endif %}
    </div>
    <form method="post" action=".">
    {% csrf_token %}
        <p><input type="hidden" name="next" value="/" /></p>    
        <p>
            <label for="id_username">用户名:</label>{{ form.username }}
            {% if form.username.errors %}
                <strong>
                {% for error in form.username.errors %}
                    {{ error|escape }}
                {% endfor %}
                </strong>
            {% endif %}
        </p>
        <p>
            <label for="id_password">密码:</label> {{ form.password }}
            {% if form.password.errors %}
                <strong>
                {% for error in form.password.errors %}
                    {{ error|escape }}
                {% endfor %}
                </strong>
            {% endif %}
        </p>
        <p><input type="submit" value="登录" class="signin"/></p>
    </form>
    <div class="sect">
        <h3>公告</h3>
        <ul>
            <li><a href="#">加入DMblog团队!</a></li>
            <li><a href="http://rsj217.diandian.com">作者博客!</a></li>
            <li><a href="https://github.com/rsj217/dmblog">开源地址!</a></li>
        </ul>
    </div>
</div>
{% endblock %}
